package io.renren.dao;

import io.renren.common.dao.BaseDao;
import io.renren.dto.FoodDTO;
import io.renren.dto.SupplierFoodDTO;
import io.renren.entity.SupplierFoodEntity;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Select;

import java.util.List;

/**
 * 供应商_食材表
 *
 * @author 翟文闯 619556390@QQ.com
 * @since 1.0.0 2019-11-22
 */
@Mapper
public interface SupplierFoodDao extends BaseDao<SupplierFoodEntity> {

    @Select("select f.* ,cf.unit_price as unitPrice" +
            " from  canteens_supplier_food cf,canteens_food f " +
            "where cf.food_id = f.food_id " +
            "and 1 = 1 " +
            "and cf.supplier_id =" +"'${id}'")
	List<FoodDTO> selectUnitPrice(long id);
}